package com.Lyy.controller;

import com.Lyy.enity.Student;
import com.Lyy.service.StudentSEI;
import lombok.Data;

@Data
public class StudentC {
    private StudentSEI studentSEI;

    public Student getStudentByID(int id){
        Student student = studentSEI.getStudentById(id);
        return student;
    };
    public String deleteById(int id) {
        Boolean rs = studentSEI.deleteById(id);
        return rs ? "删除成功" : "删除失败";
    }
    public String addStudent(Student student) {
        Boolean rs = studentSEI.addStudent(student);
        return rs ? "添加成功" : "添加失败";
    }

    public String updateStudent(Student student) {
        return null;
    }
}
